<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Spring Boot 核心优势解析</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
        }
        
        .hero-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        
        .feature-card {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            transition: all 0.3s ease;
            border: 1px solid rgba(255, 255, 255, 0.18);
        }
        
        .feature-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
        }
        
        .code-block {
            background: #282c34;
            color: #abb2bf;
            border-radius: 8px;
            overflow-x: auto;
        }
        
        .drop-cap {
            float: left;
            font-size: 4rem;
            line-height: 1;
            font-weight: 700;
            margin-right: 0.5rem;
            color: #667eea;
            font-family: 'Noto Serif SC', serif;
        }
        
        .section-number {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 2.5rem;
            height: 2.5rem;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-radius: 50%;
            font-weight: 700;
            margin-right: 1rem;
        }
        
        .mermaid {
            display: flex;
            justify-content: center;
            margin: 2rem 0;
        }
        
        .highlight-text {
            background: linear-gradient(120deg, #f093fb 0%, #f5576c 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            font-weight: 600;
        }
        
        .image-container {
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            margin: 2rem 0;
        }
        
        .image-container img {
            width: 100%;
            height: auto;
            display: block;
        }
    </style>
</head>
<body>
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20 px-6">
        <div class="max-w-6xl mx-auto text-center">
            <h1 class="text-5xl md:text-6xl font-bold mb-6 tracking-tight">
                Spring Boot <span class="text-yellow-300">核心优势</span>
            </h1>
            <p class="text-xl md:text-2xl mb-8 opacity-90 max-w-3xl mx-auto leading-relaxed">
                通过自动配置和约定大于配置的原则，让 Java 开发变得前所未有的简单高效
            </p>
            <div class="flex justify-center space-x-4 text-lg">
                <span class="flex items-center"><i class="fas fa-rocket mr-2"></i> 快速开发</span>
                <span class="flex items-center"><i class="fas fa-cog mr-2"></i> 自动配置</span>
                <span class="flex items-center"><i class="fas fa-cloud mr-2"></i> 微服务支持</span>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <main class="max-w-7xl mx-auto px-6 py-12">
        <!-- Introduction -->
        <div class="bg-white rounded-2xl shadow-xl p-8 mb-12">
            <p class="text-lg leading-relaxed text-gray-700">
                <span class="drop-cap">S</span>pring Boot 通过自动配置和约定大于配置的原则，大大减少了项目的配置工作。它可以根据项目的依赖和环境自动配置许多常见的功能，让开发者可以更专注于业务逻辑的实现。
            </p>
        </div>

        <!-- Visualization -->
        <div class="bg-white rounded-2xl shadow-xl p-8 mb-12">
            <h2 class="text-3xl font-bold mb-6 text-center text-gray-800">Spring Boot 生态系统架构</h2>
            <div class="mermaid">
                graph TB
                    A[Spring Boot 核心] --> B[快速开发]
                    A --> C[内置容器]
                    A --> D[微服务支持]
                    A --> E[自动化配置]
                    A --> F[简化配置]
                    A --> G[Actuator]
                    A --> H[生态系统]
                    A --> I[依赖管理]
                    
                    B --> B1[Spring Initializr]
                    B --> B2[热部署]
                    
                    C --> C1[Tomcat]
                    C --> C2[Jetty]
                    C --> C3[Undertow]
                    
                    D --> D1[Spring Cloud]
                    D --> D2[服务发现]
                    D --> D3[配置管理]
                    
                    E --> E1[条件注解]
                    E --> E2[自动装配]
                    
                    G --> G1[健康检查]
                    G --> G2[性能监控]
                    G --> G3[应用管理]
                    
                    style A fill:#667eea,stroke:#fff,stroke-width:3px,color:#fff
                    style B fill:#f093fb,stroke:#fff,stroke-width:2px,color:#fff
                    style C fill:#f093fb,stroke:#fff,stroke-width:2px,color:#fff
                    style D fill:#f093fb,stroke:#fff,stroke-width:2px,color:#fff
                    style E fill:#f093fb,stroke:#fff,stroke-width:2px,color:#fff
                    style F fill:#f093fb,stroke:#fff,stroke-width:2px,color:#fff
                    style G fill:#f093fb,stroke:#fff,stroke-width:2px,color:#fff
                    style H fill:#f093fb,stroke:#fff,stroke-width:2px,color:#fff
                    style I fill:#f093fb,stroke:#fff,stroke-width:2px,color:#fff
            </div>
        </div>

        <!-- Features Grid -->
        <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
            <!-- Feature 1: 快速开发 -->
            <div class="feature-card rounded-2xl p-8">
                <div class="flex items-center mb-4">
                    <span class="section-number">1</span>
                    <h2 class="text-2xl font-bold text-gray-800">快速开发</h2>
                </div>
                <p class="text-gray-600 mb-4 leading-relaxed">
                    Spring Boot 提供了快速开发的特性，例如内嵌的 Servlet 容器、热部署等，可以在开发阶段大大提高开发效率。我们有一个 Spring 初始化器，可以帮助我们非常轻松地创建 Spring Boot 应用程序。
                </p>
                <div class="image-container">
                    <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1707612034642-6e357e95-1f02-4e41-b4fb-7d03b7977d2d.png" alt="Spring Initializr">
                </div>
            </div>

            <!-- Feature 2: 内置容器 -->
            <div class="feature-card rounded-2xl p-8">
                <div class="flex items-center mb-4">
                    <span class="section-number">2</span>
                    <h2 class="text-2xl font-bold text-gray-800">内置容器</h2>
                </div>
                <p class="text-gray-600 mb-4 leading-relaxed">
                    Spring Boot 提供了内置的构建服务器，如 Tomcat、Jetty、Undertow 等容器，可以快速启动和运行项目。这些嵌入式服务器帮助我们快速进行本地开发，无需外部配置。
                </p>
                <div class="flex justify-center space-x-8 mt-6">
                    <div class="text-center">
                        <i class="fas fa-server text-4xl text-purple-600 mb-2"></i>
                        <p class="text-sm font-medium">Tomcat</p>
                    </div>
                    <div class="text-center">
                        <i class="fas fa-rocket text-4xl text-pink-600 mb-2"></i>
                        <p class="text-sm font-medium">Jetty</p>
                    </div>
                    <div class="text-center">
                        <i class="fas fa-bolt text-4xl text-indigo-600 mb-2"></i>
                        <p class="text-sm font-medium">Undertow</p>
                    </div>
                </div>
            </div>

            <!-- Feature 3: 微服务支持 -->
            <div class="feature-card rounded-2xl p-8">
                <div class="flex items-center mb-4">
                    <span class="section-number">3</span>
                    <h2 class="text-2xl font-bold text-gray-800">微服务支持</h2>
                </div>
                <p class="text-gray-600 mb-4 leading-relaxed">
                    Spring Boot 天生支持微服务架构，通过 Spring Cloud 等项目，可以快速构建和部署分布式系统。Spring Cloud 提供了配置管理、服务发现、服务容错、服务路由等功能。
                </p>
                <div class="image-container">
                    <img src="https://cdn.nlark.com/yuque/0/2024/png/21449790/1707611878622-05b29ed6-d0ab-4075-b776-389dbcd544c8.png" alt="Spring Cloud Architecture">
                </div>
            </div>

            <!-- Feature 4: 自动化配置 -->
            <div class="feature-card rounded-2xl p-8">
                <div class="flex items-center mb-4">
                    <span class="section-number">4</span>
                    <h2 class="text-2xl font-bold text-gray-800">自动化配置</h2>
                </div>
                <p class="text-gray-600 mb-4 leading-relaxed">
                    Spring Boot 的自动装配原理通过条件注解和 Spring Boot Starter 实现。项目启动时，Spring Boot 会根据条件注解判断是否需要自动装配某些组件，并将这些组件自动注册到 Spring 容器中。
                </p>
                <div class="bg-gray-100 rounded-lg p-4 mt-4">
                    <div class="flex items-center space-x-4">
                        <i class="fas fa-magic text-3xl text-purple-600"></i>
                        <div>
                            <p class="font-semibold text-gray-800">@EnableAutoConfiguration</p>
                            <p class="text-sm text-gray-600">自动配置的核心注解</p>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Feature 5: 简化配置 -->
            <div class="feature-card rounded-2xl p-8">
                <div class="flex items-center mb-4">
                    <span class="section-number">5</span>
                    <h2 class="text-2xl font-bold text-gray-800">简化配置</h2>
                </div>
                <p class="text-gray-600 mb-4 leading-relaxed">
                    Spring Boot 框架内部已经实现了与 Spring 以及其他常用第三方库的整合连接，并提供了默认最优化的整合配置。更加提倡使用 Java Config 替换传统的 XML 配置方式。
                </p>
                <div class="code-block p-4 mt-4">
                    <pre><code>@Configuration
public class BeanConfig {
    
    @Bean
    public TestService getTestService() {
        return new TestService();
    }
}</code></pre>
                </div>
            </div>

            <!-- Feature 6: Actuator -->
            <div class="feature-card rounded-2xl p-8">
                <div class="flex items-center mb-4">
                    <span class="section-number">6</span>
                    <h2 class="text-2xl font-bold text-gray-800">Actuator</h2>
                </div>
                <p class="text-gray-600 mb-4 leading-relaxed">
                    Spring Boot 提供了 Actuator 模块，可以帮助开发者监控和管理应用程序。Actuator 的核心是端点 Endpoint，用来监视应用程序及交互，内置了非常多的 Endpoint。
                </p>
                <div class="grid grid-cols-3 gap-4 mt-6">
                    <div class="text-center bg-purple-100 rounded-lg p-3">
                        <i class="fas fa-heartbeat text-2xl text-purple-600 mb-1"></i>
                        <p class="text-sm font-medium">Health</p>
                    </div>
                    <div class="text-center bg-pink-100 rounded-lg p-3">
                        <i class="fas fa-info-circle text-2xl text-pink-600 mb-1"></i>